const mongoose = require("mongoose");
Schema = mongoose.Schema;
const categorySchema = new Schema({
  name: {
    type: String
  },
  //  注意
  parent: {
    type: mongoose.SchemaTypes.ObjectId,
    ref: 'category'
  }
});

module.exports = mongoose.model("Category", categorySchema);
